package gameClass;

import gameTypes.Vector2;

/**
 * @author Ben Elliott
 *
 */
public class Camera {
	Vector2 location;
	
	public Camera() {
		location = new Vector2();
	}
	
	public Vector2 getLocation() {
		return location;
	}
	
	public void setLocation(float x, float y) {
		location.x = x;
		location.y = y;
		
		// Clamp to 0,0
		if (location.x < 0) location.x = 0;
		if (location.y < 0) location.y = 0;
	}
	
	public void setX(float x) {
		location.x = x;
		
		// Clamp to 0,0
		//if (location.x < 0) location.x = 0;
	}
	
	public void setY(float y) {
		location.y = y;
		
		// Clamp to 0,0
		//if (location.y < 0) location.y = 0;
	}
	
	public void setLocation(Vector2 loc) {
		location = loc;
		
		// Clamp to 0,0
		if (location.x < 0) location.x = 0;
		if (location.y < 0) location.y = 0;
	}
}
